<!--DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>打印列表</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

<link   type="text/css" rel="stylesheet"  href="./theme/print/css/layui.css">
<script type="text/javascript" src="./theme/print/js/jquery.min.js"></script>
<script type="text/javascript" src="./theme/print/js/layui.js"></script>
<script type="text/javascript" src="./theme/print/js/layui.all.js"></script-->
<style type="text/css">
.layui-warpp{
   width: 900px;
   margin: 0 auto;

}
.layui-form-label{
  width: 150px;
}
.layui-maleft{ margin:-left:110px;}
.sbumitdiv{
   float: right;margin-right: 20px;
}
.hr{
   margin-top: 10%;
}
</style>
</head>
<body>
<br/><br/><br/><br/>
<div class="layui-warpp">
    <form class="layui-form" action="">
        <div class="layui-form-item">
            <label class="layui-form-label">姓名：</label>
            <div class="layui-input-inline">
                <input type="text" name="name" required lay-verify="required" autocomplete="off" class="layui-input" value="<?php echo  $baoandata->name ;?>">
                <input type="text" style="display:none" name="date_id" required lay-verify="required" autocomplete="off" class="layui-input" value="<?php echo  $baoandata->id ;?>">
            </div>
            <label class="layui-form-label ">发证日期：</label>
            <div class="layui-input-inline">
                <input type="text" name="date" id="date"  required lay-verify="required" autocomplete="off" class="layui-input" value="<?php echo $baoandata->fadate ;?>">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">身份证：</label>
            <div class="layui-input-inline">
                <input type="text" name="sfz" required lay-verify="identity" autocomplete="off" class="layui-input"   value="<?php echo  $baoandata->sfz ;?>">
            </div>
            <label class="layui-form-label ">保安员证编号：</label>
            <div class="layui-input-inline">
                <input type="text" name="papers" required lay-verify="required" autocomplete="off" class="layui-input" value="<?php echo  $baoandata->papers ;?>">
            </div>
        </div>
        <div class="layui-form-item layui-row">
            <label class="layui-form-label ">地址：</label>
            <div class="layui-input-block  ">
                <input type="text" style="width:72%" name="address" required lay-verify="required" placeholder="请输入地址" autocomplete="off" class="layui-input" value="<?php echo  $baoandata->address ;?>">
            </div>
        </div>

          <hr class="hr">
           <div class="layui-form-item sbumitdiv">

                    <div class="layui-input-block">
                        <!--button type="reset" class="layui-btn  layui-btn-danger"  onclick="del-btn(<?php echo  $baoandata->id ;?>)">删除</button-->
                        <button class="layui-btn" lay-submit lay-filter="formup">更新</button>
                    </div>
           </div>


    </form>
</div>


<script>

     layui.use(['form', 'laydate'], function(){
            var form = layui.form,
                  layer = layui.layer,
                  laydate = layui.laydate;
                   form.render();
                  //执行一个laydate实例
              laydate.render({
                elem: '#date' //指定元素
              });
                   //监听提交
       form.on('submit(formup)', function(data){
               var con = data.field;
              //alert( JSON.stringify(data.field));
               var layerMsg = layer.load(1,{ // 此处1没有意义，随便写个东西
                    icon: 0, // 0~2 ,0比较好看
                    shade: [0.5,'black'] // 黑色透明度0.5背景
                    });
             $.ajax({
                    type: "post",
                    url: 'baoan-up_editor',
                    data:con,
                    datatype: "html",
                    success: function(data) {
                       // layer.close(layerMsg);
                        layer.closeAll();
                        layer.msg('更新成功',{time: 1000});

                    },
                    error:function () {
                     layer.close('加载失败请重试'); // 关闭单个

                    }
            });
          return false;
          });
 //编辑
       /* $(".editor").on('click',function() {
                var upid = $(this).attr('data-id');
               // alert(22);
                $.ajax({
                      type:"post",
                      url: 'baoan-editor',
                      data:{ upid: upid},
                      dataType:'html',
                      success:function(data){
                        layer.open({
                            type: 1,
                            title: '编辑',
                            area: ['900px', '420px'],
                            shade: 0.3,
                            shadeClose: true,
                            offset: '20px',
                            maxmin: false,
                            content: data,
                            success:function(){
                                layer.closeAll('loading'); //关闭加载层
                          }
                        });
                      }
                })
        });
        */


 });
</script>

</body>
</html>